﻿
//===============================================================================
//
//  IMPORTANT NOTICE, PLEASE READ CAREFULLY:
//
//  => This code is licensed under the GNU General Public License (GPL v3). A copy of the license is available at:
//        https://www.gnu.org/licenses/gpl.txt
//
//  => As stated in the license text linked above, "The GNU General Public License does not permit incorporating your program into proprietary programs". It also does not permit incorporating this code into non-GPL-licensed code (such as MIT-licensed code) in such a way that results in a non-GPL-licensed work (please refer to the license text for the precise terms).
//
//  => Licenses that permit proprietary use are available at:
//        http://www.cshtml5.com
//
//  => Copyright 2019 Userware/CSHTML5. This code is part of the CSHTML5 product (cshtml5.com).
//
//===============================================================================



namespace System.IO
{
    public class FileInfo //: FileSystemInfo
    {
        protected String FullPath;          // fully qualified path of the directory
        protected String OriginalPath;      // path passed in by the user
        private String _displayPath = "";   // path that can be displayed to the user

        public FileInfo(string fileName)
        {
            OriginalPath = fileName;
            FullPath = fileName;
        }

        public String FullName { get { return FullPath; } }
        public String Name { get { return Path.GetFileName(FullPath); } }

        public FileStream Open(FileMode mode, FileAccess access, FileShare share)
        {
            return null;
        }

        public bool Exists
        {
            get
            {
                throw new NotImplementedException("FileInfo error - Exist - ");
            }
        }

        public String Extension
        {
            get
            {
                string[] split = FullPath.Split('.');
                if (split.Length > 0)
                    return split[split.Length - 1];
                return string.Empty;
            }
        }


    }

}